//3.
#include<stdio.h>
int main()
{
	int n = 0;
	float item = 0.0f,sum = 1.0f,k = 1.0f;
	printf("input n:");
	scanf("%d",&n);
	for(int i = 2; i <= n; i++)
	{
		item = k/i;
		k = -k;
		sum += item; 
	}
	printf("sum = %f\n",sum);
	return 0;
}
